package com.fhz.mvvmshopjava.ui.sell;

import androidx.lifecycle.LiveData;

import com.fhz.mvvmshopjava.api.ServiceApi;
import com.fhz.mvvmshopjava.core.BaseRepository;
import com.fhz.mvvmshopjava.core.BaseViewModel;
import com.fhz.mvvmshopjava.entity.Goods;
import com.fhz.mvvmshopjava.entity.Order;
import com.fhz.mvvmshopjava.utils.RetrofitManger;
import com.fhz.utilsfhz.ApiResponse;

import javax.inject.Inject;

import dagger.hilt.android.lifecycle.HiltViewModel;

/**
 * 时间:2022/6/8
 *
 * @author msfeng
 * 简述: TODO
 */
@HiltViewModel
public class SellViewModel extends BaseViewModel<SellRepository> {

    @Inject
    public SellViewModel(SellRepository repository) {
        super(repository);
    }

    public LiveData<ApiResponse<Goods>> getGoods(String id){
        return repository.getGoods(id);
    }

    public LiveData<ApiResponse<Order>> addOrder(Order order){
        return repository.addOrder(order);
    }
}

